<!--
 * @Author: YaYa
 * @Date: 2021-12-29 10:23:36
 * @LastEditTime: 2021-12-29 10:30:48
 * @LastEditors: YaYa
 * @Description: 
 * @FilePath: \study\day04\4-计算属性.html
 * 别乱动！
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>

<body>
  <div id="app">
    <h1>{{msg}}</h1>
    <h2>{{MSG}}</h2>
  </div>
  <script>
    let vm = new Vue({
      el: '#app',
      data: {
        msg: 'hello vue'
      },
      computed: {
        MSG() {
          return this.msg + 'hello computed'
        }
      }
    })
  </script>

</body>

</html>